package com.el.test;

public class Main {

    public static void main(String[] args) {
        final FakeProcessor fp1 = new FakeProcessor();
        FakeProcessor2 fp2 = new FakeProcessor2();
        TestBuilder tb = new TestBuilder();
        
        fp1.setProc2(fp2);
        fp2.setBuilder(tb);
        
        Thread t1 = new Thread() {
            public void run() {
                try {
                    for (int i=0; i<10; i++) {
                        System.out.println("Process:"+i);
                        fp1.process(0, 0);
                        sleep(500L);
                    }
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        };
        
        t1.start();
        System.out.println("Process stared...");
    }
}
